package com.tomhu.test;

public class Times {
	
	public int totolTimes(int start, int end) {
		
		int outputTimes = 0;
//		System.out.println(new java.util.Date());
		long start1 = System.nanoTime();
		for(int i = 1; i <= end; i++) {
			for(int j = i; j <= end; j++) {
				for(int k = j; k <= end; k++) {
					for(int h = k; h <= end; h++) { //37320
//						if (j >= i && k >= j && h >= k) {//919930
						outputTimes ++;
//						}
					}
				}
			}
		}
//		System.out.println(new java.util.Date());
		long end1 = System.nanoTime();
		System.out.println(end1 - start1);
		return outputTimes;
	}
	
	public static void main(String[] args) {
		
//		System.out.println("time");
		int times = new Times().totolTimes(1, 13);
		System.out.println("24点的算法的组合次数：" + times);
		
		double tiem = 24 - 8.0 / (3.0 - (8.0 / 3.0));
		System.out.println(tiem);
		double i = Math.pow(10, -13);
//		System.out.println(Math.pow(10, -15));
//		System.out.println(tiem > Math.pow(10, -13) );
//		System.out.println(Math.pow(tiem, 15));
//		System.out.println(tiem);
//		System.out.println("divid: " + 0.0 / 0.0);
		if (tiem <= i && tiem >= -i) {
			System.out.println("heol");
			
		}
	}
}
